package json.val;

public class StringVal extends JsonVal {
    public String value;
    public StringVal(String value){
        this.value = value;
    }

    @Override
    public String serializeSelf(int tabNum) {
        return this.toString();
    }

    @Override
    public String toString() {
        return "\""+value+"\"";
    }

    @Override
    public int hashCode() {
        return value.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (getClass() != obj.getClass())
            return false;
        return value.equals(((StringVal)obj).value);
    }
}
